Fixed NPE in attribute cache