Add support for extended RCODEs and detect bad RCODEs