Print more meaningful error message when function memory on a level is accessed that was not allocated
Currently, when a level for which no function memory was allocated is accessed, an std::out_of_range'
exception is thrown instead of catching the error and printing a nice message.