Since 1.5 old rules for safe sleeping are no longer working. What are the new rules?

With the addition of weather, sleeping in bed is much more important and old rules for safe placements of beds no longer work (mob always spawns when sleeping is attempted).

I can't find any information about the new rules.