Fixed a nasty bug

Not much progress today, been fighting with a nasty build bug that caused my code to recompile in an infinite loop.