Apparently this issue was related to airplayer. Once I removed the plugin, putting the receiver in standby will release control to XBMC. Now it works perfectly!
But does it only work with youtube? I cant get it to work with airvideo or other simulare apps.
Airplayer only implements the unencrypted parts of the streaming protocol, which means it does not support audio or mirroring, as stated by the authors. However, James Laird extracted the private key of an Airport Express, which could be used in Airplayer as well to enable at least audio. Let's hope they do this.