Just use xblock.location directly instead of translating to locator and back.