It's not an bug. This is how the /sync command works and should work. /sync teleports you to the last known outdoor position. So if you died in ls and then spawned in your house ls will be the last known outdoor position.
Anyway there are some players abusing this to come back to where they where killed so they can kill the killer. Doing so will get you instant banned so don't even think of it.