Changed RME adjustment to avoid double-counting missing RME in .h and .cpp files
Fixed bug that prevented catching of missing RME for functions in the first 10 lines.
Fixed another source of IndexError.