Fix decorator loading bug

Thanks for the detailed steps to reproduce this - it made it so much easier to track down.