Fixed issue where loc blocks are generated incorrectly for sub pages.