[WFLY-490][WFLY-1843] Fix read-resource NPE