force class definition checks to use absolute scope

Fix for: https://tickets.puppetlabs.com/browse/FM-1826

Applied same fix as much as possible to v1.1.1 on the forge and catalogue still compiles and runs but don't have the student code to fully replicate the original error condition and confirm resolution.

Needs comprehensive testing before merge