Very old post, but in case anyone else runs into this.. This may be the solution:
rename the package,
recreate the same package one package name/dir at a time
move the file to the new package (i.e. 'new' package but same qualifier as before)
I came across this more specifically in the src/test/resources
dir when retrieving properties for localization constants in a spring boot app, so maybe it's the same weird thing you're hitting if you created the test package all.at.once
?