Working around bizarre NPE