Yes, it's a bit tricky to get right with WP8 and it doesn't help that they don't improve things with the updates. The last developer update was a bit of a step backwards with some of the behaviour as you mentioned, so it's hard to find a solution going forward.