Made sure we don't hold locks to loaded resources (ceylon/ceylon-dist#41)