properly respond to REGISTER queries (issue #5272)