Clean up the attention system.
Fixes included for tickets #62305, #61735 and #63403.
Merge branch 'master' into ascraeus