ERPAL: Fatal error: Unsupported operand types in the flag module - fixes #498