bug 1031951 - incorrect origin check