Runtime Error: Targeting S+ (version 31 and above) requires that one flag of FLAG_IMMUTABLE be specified[...]

Even Serial is having this problem. See this

The error occurs when the call Serial1.OpenSerial block is executed.